package interfaceDemo;

import java.util.ArrayList;

public class ClassManager {
    private ArrayList<Student> students = new ArrayList<>();
    private StudentOperator studentOperator = new StudentOperatorlmpl2();
    public ClassManager(){
        students.add(new Student("喜洋洋",100,'男'));
        students.add(new Student("美羊羊",94,'女'));
        students.add(new Student("懒洋洋",64,'男'));
        students.add(new Student("沸洋洋",87,'男'));
        students.add(new Student("暖洋洋",97,'女'));
    }

    //打印全班学生的信息
    public void printInfo(){
        studentOperator.printAiiInfo(students);
    }

    //打印全班学生的平均分
    public void printScore(){
        studentOperator.printAverageScore(students);
    }
}
